package com.yuw.hwhigher04;

public class SalariedEmployee extends ColaEmployee {
	// 属性
	private double monthSalary;

	@Override
	public double getSalary(int month) {
		// 月薪员工工资的计算
		// 用到了多态--重写；通过super调用父类的方法，是为了获取该员工的生日金
		double mySalary = this.getMonthSalary() + super.getSalary(month);
		return mySalary;
	}

	public SalariedEmployee() {
		super();
	}

	public SalariedEmployee(String empName, int empMonth, double monthSalary) {
		super(empName, empMonth);
		this.monthSalary = monthSalary;
	}

	public double getMonthSalary() {
		return monthSalary;
	}

	public void setMonthSalary(double monthSalary) {
		this.monthSalary = monthSalary;
	}

}
